scripts/feeds: shallow clone for specific commit update
authorCedric CHEDALEUX <[email protected]>
Mon, 17 Feb 2025 09:41:32 +0000 (10:41 +0100)
committerChristian Marangi <[email protected]>
Wed, 5 Mar 2025 13:18:58 +0000 (14:18 +0100)
commit775f9d56ce0684ceee269aaeb43eb09227f17ef1
tree0566792a817f28c5f7f69fa2489fb5224371bd28
parent6935d0fac54c78868f3f15f054391fd2f11a7cf9
scripts/feeds: shallow clone for specific commit update

When a feed is referenced with a specific commit (i.e. <git_url>^<sha1>),
a full clone was performed and a branch was created from the sha1
and named with the sha1. Other git clones operations are shallowed.

As Git does not support clone at a specific commit, let's first perform
a shallow clone to latest commit, then fetch the relevant commit and
finally checkout it (no more 'pseudo' branch).

It saves bandwith and significantly speeds up the feed update process.

Signed-off-by: Cedric CHEDALEUX <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/18003
Signed-off-by: Robert Marko <[email protected]>
(cherry picked from commit 32d0a57dc10811a24816e51f10e55963f40fe462)
Link: https://github.com/openwrt/openwrt/pull/18168
Signed-off-by: Christian Marangi <[email protected]>
scripts/feeds